import Taro, {
  Component
} from '@tarojs/taro'
import Index from './pages/index'

import './app.css'

class App extends Component {

  config = {
    pages: [
      'pages/goods/goods',
      'pages/orders/orders',
      'pages/user/user',
      'pages/login/login',
      'pages/userEdit/userEdit',
      'pages/orderDetail/orderDetail',
      'pages/goodsDetail/goodsDetail',
      'pages/cart/cart',
      'pages/index/index',
    ],
    window: {
      backgroundTextStyle: 'light',
      navigationBarBackgroundColor: '#fff',
      navigationBarTitleText: '慧订货',
      navigationBarTextStyle: 'black'
    },
    tabBar: {
      'color': '#626567',
      'selectedColor': '#2A8CE5',
      'backgroundColor': '#FBFBFB',
      'borderStyle': 'white',
      'list': [{
        'pagePath': 'pages/index/index',
        'text': '首页',
        'iconPath': './pages/asset/images/index.png',
        'selectedIconPath': './pages/asset/images/index_focus.png'
      }, {
        'pagePath': 'pages/goods/goods',
        'text': '商品',
        'iconPath': './pages/asset/images/goods.png',
        'selectedIconPath': './pages/asset/images/goods_focus.png'
      }, {
        'pagePath': 'pages/orders/orders',
        'text': '订单',
        'iconPath': './pages/asset/images/orders.png',
        'selectedIconPath': './pages/asset/images/orders_focus.png'
      }, {
        'pagePath': 'pages/user/user',
        'text': '我的',
        'iconPath': './pages/asset/images/my.png',
        'selectedIconPath': './pages/asset/images/my_focus.png'
      }]
    }
  }
  componentDidMount() {}

  componentDidShow() {}

  componentDidHide() {}

  componentCatchError() {}

  render() {
    return (
      <Index />
    )
  }
}
if (process.env.TARO_ENV === "weapp") {
  require("taro-ui/dist/weapp/css/index.css")
} else if (process.env.TARO_ENV === "h5") {
  require("taro-ui/dist/h5/css/index.css")
}

Taro.render(<App />, document.getElementById('app'))